#ifndef __CCMS_NR_UTILS_H__
#define __CCMS_NR_UTILS_H__

/**
 * @file ccms/nr/utils.h
 *
 * Utilities class header file.
 */

#include <unistd.h>
#include <string>

namespace ccms {
namespace nr {

/**
 * Utils class, provides utilities-like static functions.
 */
class Utils
{
    public:
        /**
         * Allows to retrieve a user name of a user identified by an UID.
         * @param uid User ID (UID) of the user
         * @param bufferPtr pointer to a preallocated storage
         *        for the user name
         * @throw arlib::exception::RuntimeException
         *          if the user name cannot be resolved
         */
        static void getUsername(const uid_t uid, std::string* bufferPtr);

    private:
        /**
         * Default constructor.
         *
         * Hidden, as usually in utilities classes.
         */
        Utils();
};

} // namespace nr
} // namespace ccms

#endif /* __CCMS_NR_UTILS_H__ */
